package com.sac.approval.service;

import com.sac.approval.domain.ApprovalDO;
import com.sac.approval.domain.ApprovalLineDO;
import com.sac.approval.domain.AttachmentDO;

import java.util.List;
import java.util.Map;

/**
 * @author chglee
 * @email 1992lcg@163.com
 * @date 2018-09-18 14:37:45
 */
public interface ApprovalService {
	
	int count(Map<String, Object> map);
	
	int createApproval(ApprovalDO approval,List<ApprovalLineDO> appLines,List<AttachmentDO> attachments);

	int updateApproval(ApprovalDO approval,List<ApprovalLineDO> appLines,List<AttachmentDO> attachments);
	
	int save(ApprovalDO approval);
	
	int update(ApprovalDO approval);

	int batchUpdate(List<ApprovalDO> approvalList);

	int cancelSubmission(ApprovalDO approval,ApprovalLineDO line);
	
	int remove(String appId);
	
	int batchRemove(String[] appIds);

	void sendEmail(List<ApprovalLineDO> lineList,ApprovalDO app);

	void pushPendingNotification(List<ApprovalLineDO> lineList, ApprovalDO app);

	void handleApprove(Map<String, Object> params);

	void handleArbi(Map<String, Object> params);

	void handleReject(Map<String, Object> params);
}
